package com.ruoyi.db.ums.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 会员管理对象 ums_user
 *
 * @author ruoyi
 * @date 2020-04-22
 */

@ApiModel("会员管理实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class UmsUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("会员ID")
    private Long id;

    @ApiModelProperty("用户名称")
    @Excel(name = "用户名称")
    @NotBlank(message = "用户名称不能为空")
    @Size(min = 0, max = 63, message = "用户名称长度不能超过63个字符")
    private String username;

    @ApiModelProperty("用户密码")
    @Excel(name = "用户密码")
    @NotBlank(message = "用户密码不能为空")
    @Size(min = 0, max = 63, message = "用户密码长度不能超过63个字符")
    private String password;

    @ApiModelProperty("性别（0男 1女 1未知）")
    @Excel(name = "性别", readConverterExp = "0=男,1=女,1=未知")
    @NotBlank(message = "性别不能为空")
    private Integer gender;

    @ApiModelProperty("生日")
    @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime birthday;

    @ApiModelProperty("最近登录时间")
    @Excel(name = "最近登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty("最近登录IP地址")
    @Excel(name = "最近登录IP地址")
    @NotBlank(message = "最近登录IP地址不能为空")
    @Size(min = 0, max = 63, message = "最近登录IP地址长度不能超过63个字符")
    private String lastLoginIp;

    @ApiModelProperty("会员等级（0普通用户 1VIP用户 2高级VIP用户）")
    @Excel(name = "会员等级", readConverterExp = "0=普通用户,1=VIP用户,2=高级VIP用户")
    private Integer userLevel;

    @ApiModelProperty("用户昵称")
    @Excel(name = "用户昵称")
    @NotBlank(message = "用户昵称不能为空")
    @Size(min = 0, max = 63, message = "用户昵称长度不能超过63个字符")
    private String nickname;

    @ApiModelProperty("用户手机号码")
    @Excel(name = "用户手机号码")
    @NotBlank(message = "用户手机号码不能为空")
    @Size(min = 0, max = 20, message = "用户手机号码长度不能超过20个字符")
    private String mobile;

    @ApiModelProperty("用户头像图片")
    @Excel(name = "用户头像图片")
    @NotBlank(message = "用户头像图片不能为空")
    @Size(min = 0, max = 255, message = "用户头像图片长度不能超过255个字符")
    private String avatar;

    @ApiModelProperty("微信登录openid")
    @Excel(name = "微信登录openid")
    @NotBlank(message = "微信登录openid不能为空")
    @Size(min = 0, max = 63, message = "微信登录openid长度不能超过63个字符")
    private String weixinOpenid;

    @ApiModelProperty("微信登录会话KEY")
    @Excel(name = "微信登录会话KEY")
    @NotBlank(message = "微信登录会话KEY不能为空")
    @Size(min = 0, max = 100, message = "微信登录会话KEY长度不能超过100个字符")
    private String sessionKey;

    @ApiModelProperty("会员状态（0可用 1禁用 2注销）")
    @Excel(name = "会员状态", readConverterExp = "0=可用,1=禁用,2=注销")
    @NotBlank(message = "会员状态不能为空")
    private Integer status;

    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime addTime;

    @ApiModelProperty("逻辑删除")
    @Excel(name = "逻辑删除")
    private Integer deleted;

    @ApiModelProperty("用户家乡")
    @Excel(name = "用户家乡")
    @Size(min = 0, max = 200, message = "用户家乡长度不能超过200个字符")
    private String hometown;
}
